<?php

//这是增加小组的视图

function admin_group_add(){
	$thisuser=get_user();

//增加用户
?>
<div class="admin_group_add_user">
	<div class="admin_group_add_tittle">添加人员</div>
	<form action="admin.group.add.php" method="post">
		<div class="admin_add_groupid">
			<input type="hidden" name='groupid' value='' />
		</div>
		<div class="admin_add_fid"><input type='hidden' name='fid' value='' /></div>
		<?php 
		foreach ($thisuser as $key => $value) {
			?>
			<div class="cpry_c_i">
				<input type="checkbox" value="1" 
					name=<?php echo "'".$key."'"; ?> 
					id=<?php echo "'adduser".$key."'"; ?> />
				<label for=<?php echo "'adduser".$key."'"; ?> ><?php echo $value; ?></label>
			</div>
			<?php
		}
		?>
		<input onclick="displayc('admin_group_add_user')" class="button" type="button" value="取消" />
		<input class="button" type="submit" value="增加" />

	</form>
</div>

<?php 
	$sort=get_group_sort();
//增加项目
?>
<div class="admin_group_add_project">
	<div class="admin_group_add_tittle">添加项目</div>
	<form action="admin.group.add.php" method="post">
		<div class="admin_add_groupid">
			<input type="hidden" name='groupid' value='' />
		</div>
		<div class="admin_add_fid"><input type='hidden' name='fid' value='' /></div>
		<?php 
		foreach ($sort as $key => $value) {
			?>
			<div class="cpry_c_i">
				<input type="checkbox" 
					value="1" name=<?php echo "'".$key."'"; ?> 
					id=<?php echo "'addproject".$key."'"; ?> />
				<label for=<?php echo "'addproject".$key."'"; ?> ><?php echo $value; ?></label>
			</div>
			<?php
		}
		?>
		<input onclick="displayc('admin_group_add_project')" class="button" type="button" value="取消" />
		<input class="button" type="submit" value="增加" />

	</form>
</div>

<?php
//增加组

?>
	<div class="admin_group_add_group">
		<form action="admin.creat.group.php" method="post">
		<table>
			<tr>
				<td style="padding-top:9px;">组号</td>
				<td><input required maxlength="8"  name="groupid" class="addtext" type="text" /></td>
				<td style="padding-top:9px;">名称</td>
				<td><input required maxlength="8" name="groupname" class="addtext" type="text" /></td>
				<td><input class="button" type="submit" value="增加" /></td>
				<td><input onclick="displayc('admin_group_add_group')" class="button" type="button" value="取消" /></td>
			</tr>
		</table>
		</form>
	</div>
<?php

}
?>